package com.piece.member.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "ums_member_collect_spu")
@ApiModel(value = "会员收藏商品")
public class UmsMemberCollectSpu implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", length = 11)
    @ApiModelProperty(value = "主键")
    private Long id;

    @Column(name = "member_id")
    @ApiModelProperty(value = "会员id")
    private Long memberId;

    @Column(name = "spu_id")
    @ApiModelProperty(value = "spu_id")
    private Long spuId;

    @Column(name = "spu_name")
    @ApiModelProperty(value = "spu_name")
    private String spuName;

    @Column(name = "spu_img")
    @ApiModelProperty(value = "spu_img")
    private String spuImg;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
